import request from '@/utils/request'
export function getPages(params) {
  return request({
    url: '/cwmeirimaster/getList',
    method: 'get',
    params
  })
}

export function getDetailPages(params) {
  return request({
    url: '/cwmeiridetail/getDetailPages',
    method: 'get',
    params
  })
}

export function createData(date) {
  return request({
    url: '/cwmeirimaster/createData?date=' + date,
    method: 'get'
  })
}

export function meiriAdd(data) {
  return request({
    method: 'post',
    url: '/meiri/add',
    data: {
      ...data
    }
  })
}

export function meiriUpdate(data) {
  return request({
    method: 'post',
    url: '/meiri/edit',
    data: {
      ...data
    }
  })
}

export function getById(id) {
  return request({
    method: 'get',
    url: '/meiri/getById',
    params: {
      id
    }
  })
}

export function meiriDel(id) {
  return request({
    method: 'get',
    url: '/cwmeirimaster/deleteById',
    params: {
      id
    }
  })
}

export function setDetailShishouXianjin(params) {
  return request({
    url: '/cwmeiridetail/setDetailShishouXianjin',
    method: 'get',
    params
  })
}

export function setDetailQitaShoukuan(params) {
  return request({
    url: '/cwmeiridetail/setDetailQitaShoukuan',
    method: 'get',
    params
  })
}
